import request from '@/utils/request'

// 查询会员购买设置列表
export function listVipSetting(query) {
  return request({
    url: '/weiriya/vipSetting/list',
    method: 'get',
    params: query
  })
}

// 查询会员购买设置详细
export function getVipSetting(id) {
  return request({
    url: '/weiriya/vipSetting/' + id,
    method: 'get'
  })
}

// 新增会员购买设置
export function addVipSetting(data) {
  return request({
    url: '/weiriya/vipSetting',
    method: 'post',
    data: data
  })
}

// 修改临时收费规则
export function updateVipSetting(data) {
  return request({
    url: '/weiriya/vipSetting',
    method: 'put',
    data: data
  })
}

// 删除会员购买设置
export function delVipSetting(id) {
  return request({
    url: '/weiriya/vipSetting/' + id,
    method: 'delete'
  })
}

// 获取会员价格列表
export function getVipPrice(query) {
  return request({
    url: '/weiriya/vipSetting/typeList',
    method: 'get',
    params: query
  })
}

// 获取临时收费规则
export function getTempPrice(areaId) {
  return request({
    url: `/weiriya/nonVipSetting/getByAreaId/${areaId}`,
    method: 'get'
  })
}